// 全局样式重置
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: #333;
  background-color: #f5f5f5;
}

// 滚动条样式
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
  
  &:hover {
    background: #a8a8a8;
  }
}

// LogicFlow 自定义样式
.lf-canvas-overlay {
  .lf-menu {
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    
    .lf-menu-item {
      padding: 8px 16px;
      font-size: 14px;
      color: #333;
      cursor: pointer;
      transition: background-color 0.3s;
      
      &:hover {
        background-color: #f5f5f5;
      }
      
      &:not(:last-child) {
        border-bottom: 1px solid #f0f0f0;
      }
    }
  }
}

// MD节点样式增强
.md-node-content {
  h1, h2, h3, h4, h5, h6 {
    margin: 8px 0 4px 0;
    color: #1890ff;
  }
  
  p {
    margin: 4px 0;
    line-height: 1.5;
  }
  
  ul, ol {
    margin: 4px 0;
    padding-left: 20px;
  }
  
  li {
    margin: 2px 0;
  }
  
  code {
    background: #f5f5f5;
    padding: 2px 4px;
    border-radius: 2px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
  }
  
  pre {
    background: #f5f5f5;
    padding: 8px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 8px 0;
    
    code {
      background: none;
      padding: 0;
    }
  }
  
  blockquote {
    border-left: 4px solid #1890ff;
    padding-left: 8px;
    margin: 8px 0;
    color: #666;
    font-style: italic;
  }
  
  table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0;
    
    th, td {
      border: 1px solid #e8e8e8;
      padding: 4px 8px;
      text-align: left;
    }
    
    th {
      background: #fafafa;
      font-weight: bold;
    }
  }
  
  hr {
    border: none;
    border-top: 1px solid #e8e8e8;
    margin: 12px 0;
  }
}

// 对话框样式增强
.el-dialog {
  .el-dialog__header {
    background: #fafafa;
    border-bottom: 1px solid #e8e8e8;
  }
  
  .el-dialog__body {
    padding: 20px;
  }
}

// 工具栏样式
.toolbar {
  .el-button-group {
    .el-button {
      border-radius: 4px;
      
      &:not(:last-child) {
        margin-right: 8px;
      }
    }
  }
}

// 加载状态
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

// 响应式设计
@media (max-width: 768px) {
  .toolbar {
    padding: 10px;
    
    .el-button-group {
      .el-button {
        padding: 8px 12px;
        font-size: 12px;
      }
    }
  }
  
  .el-dialog {
    width: 90% !important;
    margin: 5vh auto;
  }
}